Skip to content

Conversation

@plemarquand
Copy link
Contributor

Description

When a mock was configured we captured its value and replaced it with the mocked value, then put the value back when the tests were complete.

However by capturing and resetting the value, we lost metadata about the property such as its writable or configurable state. This would break certain types of objects if they were to be used by subsequent tests that had non-standard property definitions.

Tasks

  • [ ] Required tests have been written
  • [ ] Documentation has been updated
  • [ ] Added an entry to CHANGELOG.md if applicable

When a mock was configured we captured its value and replaced it with
the mocked value, then put the value back when the tests were complete.

However by capturing and resetting the value, we lost metadata about the
property such as its `writable` or `configurable` state. This would
break certain types of objects if they were to be used by subsequent
tests that had non-standard property definitions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant